package com.franklin.ideaplugin.api.beans.variable.impl;

import com.franklin.ideaplugin.api.beans.variable.IVariable;
import com.intellij.psi.PsiField;
import com.intellij.psi.PsiType;

/**
 * 类字段
 *
 * @author Ye Junhui
 * @since 2024/3/6
 */
public class FieldVariable implements IVariable<PsiField> {

    private PsiField psiField;

    public FieldVariable(PsiField psiField) {
        this.psiField = psiField;
    }

    @Override
    public String getName() {
        return this.psiField.getName();
    }

    @Override
    public PsiField getPsiElement() {
        return this.psiField;
    }

    @Override
    public PsiType getPsiType() {
        return this.psiField.getType();
    }
}
